package com.oncecloud.devops.client.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.oncecloud.devops.client.dao.AuthorityMapper;
import com.oncecloud.devops.client.entity.Authority;
import com.oncecloud.devops.client.service.AuthorityService;
@Component
public class AuthorityServiceImpl implements AuthorityService{
	@Resource
	private AuthorityMapper authorityMapper;
	@Override
	public List<Authority> getUserRoleAuths(Map<String,Integer> map) {
		try {
			return authorityMapper.selectAuthoritiesByUserIdAndEnvId(map);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}
	
}
